<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>属性选择器</title>
    <style>
        [class]{
            color: palevioletred;
        }
        [class=l1]{
            color: yellowgreen;
        }
    </style>
</head>
<body>
<ul class="l1">
    <li  >List item 1</li>
    <li  >List item 2</li>
    <li  >List item 3</li>
</ul>
<ul class="l2">
    <li  id="four">List item 1</li>
    <li  id="five">List item 2</li>
    <li  id="six">List item 3</li>
</ul>

</body>
</html>